using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Dapper.MsSql.Test
{
    [Table("SysUser")]
    public class SysUser
    {
        /// <summary>
        /// 主键
        /// </summary>    
        [Key]
        [Required]
        [StringLength(32)]
        [Display(Name = "主键")]
        [Column("SysUserid")]
        public string SysUserid { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>    
        [Required]
        [Display(Name = "创建时间")]
        [Column("CreateDatetime")]
        public DateTime CreateDatetime { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>    
        [Required]
        [StringLength(32)]
        [Display(Name = "邮箱")]
        [Column("Email")]
        public string Email { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>    
        [Required]
        [StringLength(11)]
        [Display(Name = "手机号")]
        [Column("Mobile")]
        public string Mobile { get; set; }

        /// <summary>
        /// 密码
        /// </summary>    
        [Required]
        [StringLength(32)]
        [Display(Name = "密码")]
        [Column("Password")]
        public string Password { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>    
        [Required]
        [StringLength(16)]
        [Display(Name = "姓名")]
        [Column("RealName")]
        public string RealName { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>    
        [Required]
        [StringLength(16)]
        [Display(Name = "用户名")]
        [Column("UserName")]
        public string UserName { get; set; }

        /// <summary>
        /// UserStatus
        /// </summary>    
        [Required]
        [Display(Name = "UserStatus")]
        [Column("UserStatus")]
        public int UserStatus { get; set; }

        /// <summary>
        /// UserType
        /// </summary>    
        [Required]
        [Display(Name = "UserType")]
        [Column("UserType")]
        public EUserType UserType { get; set; }
    }

    public enum EUserType
    {
        Admin,
        Super
    }
}
